<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" isELIgnored="false"%>
   <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %> 
<%@include file="commen/path.jsp" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>电商平台的后台管理系统</title>
		<link rel="stylesheet" href="${path}/css/main.css" />
		<link rel="stylesheet" href="${path}/css/list.css" />
	</head>
	<body>
		<div id="content">
			<%@ include file="commen/head.jsp" %>
			<div class="middle">
				 <%@ include file="commen/left.jsp" %>
				  <div class="right">
				  	 <div>vip会员管理</div>
				  	<div>
				  	   <table>
				  	    <tr>
				  	     <td>编号</td>
				  	     <td>用户名</td>
				  	     <td>密码</td>
				  	    </tr>
				  	    <c:forEach items="${page.data }" var="user">
				  	     <tr>
				  	     <td>${user.uid }</td>
				  	     <td>${user.uname }</td>
				  	     <td>${user.upwd}</td>
				  	    </tr>
				  	    </c:forEach>
				  	   </table>
				  	   <div id="page">
				  	      <a onclick="lastPage()">上一页</a> <a onclick="nextPage()">下一页</a>
				  	   </div>
				  	</div>
				  </div>
			</div>
			<%@ include file="commen/foot.jsp" %>
			
			<script>
			   function lastPage(){
				   var n=${page.pageNum};
				   /* alert(n); */
				   if(n<=1){
					   window.location.href="${path}/user/listpage/1";
				   }else{
					   window.location.href="${path}/user/listpage/"+(--n);
				   }
				   
			   }
			   
			   function nextPage(){
				   var n=${page.pageNum};
				   var count=${page.pageCount};
				   /* alert(n); */
				   if(n>=count){
					   window.location.href="${path}/user/listpage/"+count;
				   }else{
					   window.location.href="${path}/user/listpage/"+(++n);
				   }
				   
			   }
			</script>
		</div>
	</body>
</html>
